package net.zhuike.novel.app.ui.activity;

import android.app.ProgressDialog;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;

import net.zhuike.novel.app.R;
import net.zhuike.novel.app.ui.base.Constant;
import net.zhuike.novel.app.ui.utils.SharedPreferencesUtil;

import framework.common.baseui.UeBaseActivity;

/**
 * 关于我们
 * Created by qi.wang on 2017/6/24.
 */

public class AboutActivity extends UeBaseActivity {
    private ImageView checkVersion;
    private TextView aboutTx;
    private TextView versionTv;
    private Context context;
    private ProgressDialog pro;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        baseSetContentView(R.layout.activity_help);
        context = this;
        hiddenFooter();
        showGoBackBtn();
        setTitleText("关于");
        checkVersion = (ImageView) findViewById(R.id.checkVersion);
        versionTv = (TextView) findViewById(R.id.version);
        aboutTx = (TextView) findViewById(R.id.aboutTx);
        //getSysConfig();
        try {
            PackageManager manager = this.getPackageManager();
            PackageInfo info = manager.getPackageInfo(this.getPackageName(), 0);
            String versionName = info.versionName;
            versionTv.setText("v"+versionName);
            if(SharedPreferencesUtil.getInstance().getString(Constant.email)!=null){
                aboutTx.setText(SharedPreferencesUtil.getInstance().getString(Constant.email));
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }


}
